import random
import json

def shuffle_data(file1, output_file):
    with open(file1, 'r') as f1:
        data1 = json.load(f1)
        random.shuffle(data1)
    with open(output_file, 'w') as of:
        json.dump(data1, of, ensure_ascii=False, indent=4)

# 调用函数

shuffle_data('train_data1226.json', 'train_data1226_shuffle.json')
